﻿<UserControl x:Class="VoiceRecorder.SaveView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:my="clr-namespace:VoiceRecorder.Core;assembly=VoiceRecorder.Core"
    Background="Khaki">
    <StackPanel >
        <Label Margin="5" HorizontalAlignment="Center" FontWeight="Bold" FontSize="20">.NET Voice Recorder</Label>
        <Label Margin="5">Select audio to be saved:</Label>
        <my:WaveFileTrimmerControl Margin="5" 
                SampleAggregator="{Binding SampleAggregator}"                                    
                TotalWaveFormSamples="{Binding TotalWaveFormSamples}"
                LeftSelection="{Binding LeftPosition, Mode=TwoWay}"
                RightSelection="{Binding RightPosition, Mode=TwoWay}"/>
        <StackPanel Orientation="Horizontal">
            <Button Margin="5" Padding="10,0" Command="{Binding PlayCommand}" ToolTip="Play">
                <Path Fill="DarkGreen"  Data="M 0,0 l 8,8 l -8,8 Z" />
            </Button>
            <Button Margin="5" Padding="10,0"  Command="{Binding StopCommand}" ToolTip="Stop">
                <Path Fill="Blue" Data="M 0,0 h 15 v 15 h -15 Z" />
            </Button>
            <Button Margin="5" Width="100" Command="{Binding SelectAllCommand}">Select All</Button>
        </StackPanel>
        <StackPanel Orientation="Horizontal">
            <Button Margin="5" Width="100" Command="{Binding SaveCommand}">Save...</Button>
            <Button Margin="5" Width="100" Command="{Binding AutoTuneCommand}">AutoTune</Button>
        </StackPanel>
    </StackPanel>
</UserControl>
